package com.css.base;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.css.util.UUIDUtil;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * -
 * </p>
 *
 * @author css
 * @since 2020/3/21
 */
public class BaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M, T> implements IService<T> {
    @Autowired
    private HttpServletRequest request;
    @Autowired
    protected UUIDUtil uuidUtil;

    public Integer getUserId() {
//        BasUser attribute = (BasUser) request.getAttribute(Const.CURRENT_USER);
//        return attribute.getId();
        return 73;
    }

//    public void checkUUid(String uuid) {
//        uuidUtil.checkUUID(uuid);
//    }
//
//    public <T> T checkGetUUid(String uuid) {
//        return uuidUtil.checkGetUUID(uuid);
//    }
}
